<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport"
	content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<title></title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="css/type.css" rel="stylesheet" type="text/css">
<!-- Do not move the bellow script to custom.js! It must stay here to
    load properly! -->
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/jquerysession.js"></script>
<script type="text/javascript" src="scripts/layer/layer.m.js"></script>
</head>
<body>
<script type="text/javascript">
	var code = "${param.code}";
	var sign = "${param.sign}";
	$.ajax({
	   type: "post",
	   url: "transactionRouter2app",
	   data:{"funcID":"0015","code":code,"sign":sign},
	   success: function(v){
			var openid = v.platformId;
			if(v.responseCode=="00000"&&typeof openid != "undefined"&&openid!=""){
				$.session.set('platformId',openid);
				location.replace("index2app.jsp");
			}else{
				location.href = "web2app/returnMsg.jsp?isapp=0"
				//layer.open({content: '请先注册！',time: 2,end: function(){location.href = "http://112.124.59.126:8080/youboxapia/register.jsp?platformId="+openid;}});
			}
	   },
	   error: function(v){
		   alert("error");
	   } 
	});
</script>
</body>
</html>